﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using HengTong.Model;
using HengTong.Model.Db.Hr.Bill;
using TiaoTaoHelper.Wtm.Models;


namespace HengTong.ViewModel.Hr.SysHrStaffNeedRequestBillEntryVms
{
    public partial class SysHrStaffNeedRequestBillEntryTemplateVm : BaseTemplateVM
    {
        [Display(Name = "招聘人数")]
        public ExcelPropety HireNumberExcel = ExcelPropety.CreateProperty<SysHrStaffNeedRequestBillEntry>(x => x.HireNumber);
        [Display(Name = "申请原因")]
        public ExcelPropety ApplyReasonExcel = ExcelPropety.CreateProperty<SysHrStaffNeedRequestBillEntry>(x => x.ApplyReason);
        [Display(Name = "到岗时间")]
        public ExcelPropety ExpectedDateExcel = ExcelPropety.CreateProperty<SysHrStaffNeedRequestBillEntry>(x => x.ExpectedDate);
        [Display(Name = "岗位要求")]
        public ExcelPropety JobRequirementExcel = ExcelPropety.CreateProperty<SysHrStaffNeedRequestBillEntry>(x => x.JobRequirement);
        [Display(Name = "学历要求")]
        public ExcelPropety EducationRequirementExcel = ExcelPropety.CreateProperty<SysHrStaffNeedRequestBillEntry>(x => x.EducationRequirement);
        [Display(Name = "专业要求")]
        public ExcelPropety MajorRequirementExcel = ExcelPropety.CreateProperty<SysHrStaffNeedRequestBillEntry>(x => x.MajorRequirement);
        [Display(Name = "性别要求")]
        public ExcelPropety GenderRequirementExcel = ExcelPropety.CreateProperty<SysHrStaffNeedRequestBillEntry>(x => x.GenderRequirement);
        [Display(Name = "年龄要求")]
        public ExcelPropety AgeRequirementExcel = ExcelPropety.CreateProperty<SysHrStaffNeedRequestBillEntry>(x => x.AgeRequirement);
        [Display(Name = "其他要求")]
        public ExcelPropety OtherRequirementExcel = ExcelPropety.CreateProperty<SysHrStaffNeedRequestBillEntry>(x => x.OtherRequirement);
        [Display(Name = "所属部门")]
        public ExcelPropety GroupExcel = ExcelPropety.CreateProperty<SysHrStaffNeedRequestBillEntry>(x => x.GroupId);
        [Display(Name = "工作岗位")]
        public ExcelPropety JobPositionExcel = ExcelPropety.CreateProperty<SysHrStaffNeedRequestBillEntry>(x => x.JobPositionId);
        [Display(Name = "主表")]
        public ExcelPropety HrStaffNeedExcel = ExcelPropety.CreateProperty<SysHrStaffNeedRequestBillEntry>(x => x.HrStaffNeedId);

	    protected override void InitVM()
        {
            GroupExcel.DataType = ColumnDataType.ComboBox;
            GroupExcel.ListItems = DC.Set<SysGroup>().GetSelectListItems(Wtm, y => y.GroupName);
            JobPositionExcel.DataType = ColumnDataType.ComboBox;
            JobPositionExcel.ListItems = DC.Set<SysJobPosition>().GetSelectListItems(Wtm, y => y.Name);
            HrStaffNeedExcel.DataType = ColumnDataType.ComboBox;
            HrStaffNeedExcel.ListItems = DC.Set<SysHrStaffNeedRequestBill>().GetSelectListItems(Wtm, y => y.BillCode);
        }

    }

    public class SysHrStaffNeedRequestBillEntryImportVm : BaseImportVM<SysHrStaffNeedRequestBillEntryTemplateVm, SysHrStaffNeedRequestBillEntry>
    {

    }

}
